//---------------------------------------------------------------------------
#pragma hdrstop

#include "CheckBox.h"
#include <vcl.h>
#include "stdio.h"
#include "util.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
__fastcall CheckBox::CheckBox(char * s_parser)
{
 label=NULL;
 on_value=NULL;
 off_value=NULL;
 check=NULL;
 Visual=true;

 char * p=NULL,t[256];
 char * temp = new char[strlen(s_parser)+1];

 sprintf(t,"Alias_%x",this);

 strcpy(temp,s_parser);
 p = FindNameValueEqual(temp,"ALIAS");
 if(p) Alias = p;
 else Alias = t;

 strcpy(temp,s_parser);
 p = FindNameValue(temp,"LABEL","\"");
 if(p) Label=p;

 strcpy(temp,s_parser);
 p = FindNameValue(temp,"ONVALUE","\"");
 if(p) OnValue=p;

 strcpy(temp,s_parser);
 p = FindNameValue(temp,"OFFVALUE","\"");
 if(p) OffValue=p;

 strcpy(temp,s_parser);
 Check = FindNameValueEqualYes(temp,"CHECK");
 delete []temp;
}

